<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;
?>

<?php
include_once "function_sec_filter.php";

$in_array['Name'] = $_POST['Name'];
$in_array['InDev'] = $_POST['InDev'];
$in_array['OutDev'] = $_POST['OutDev'];
$in_array['SrcAddr'] = $_POST['SrcAddr'];
$in_array['DstAddr'] = $_POST['DstAddr'];
$in_array['Srv'] = $_POST['Srv'];
$in_array['Pro_L7'] = $_POST['Pro'];
$in_array['Time'] = $_POST['Time'];
$in_array['Target'] = $_POST['Target'];
$in_array['Enabled'] = $_POST['Enabled'];
//$in_array['Filter_Word'] = base64_encode($_POST['filter']);
//$in_array['Mark_Set'] = ($_POST['setmark']);
$in_array['Log'] = $_POST['log'];
$in_array['FilterType'] = "1";
$in_array['Time'] = $_POST['Time'];

$cpro = new CSecFilter();
$cpro->edit_item_by_name($in_array['Name'], $in_array);
$cpro->Apply();

include_once "function_misc_log.php";
$in_array['Name'] = "'". $in_array['Name']. "'";
$in_array['SrcAddr'] = "'". $in_array['SrcAddr']. "'";
$in_array['DstAddr'] = "'". $in_array['DstAddr']. "'";
$in_array['Srv'] = "'". $in_array['Srv']. "'";
$in_array['Time'] = "'". $in_array['Time']. "'";
logger("Modify", $in_array, "Securit_Policy");

include "function_web_misc.php";
PrintSuccessPageAndJump('sec_policy_rule.php');

//echo("<meta http-equiv='refresh'content=0;URL='sec_policy_rule.php'>");
?>
